<template>
  <div class="navWrapper">　　
    <ul class="navBox">
　　　<li v-for="(item, i) in navData">
　　　　<div class="navBtn" :class="{ navBtn : navBtnActive === i }" :key="i" @click="$router.push({ path: item.path }), navBtnActive = i">
          {{item.name}}
        </div>
　　　</li>
    </ul>
  </div>
</template>

<script>
  export default {
    name: 'navBar',
    components: {},
    data() {
      return {
        active: 0,
        navData: [
          { name: '政策计算器', path: '/policyCalculator' },
          { name: '政策资源', path: '/policyResources' },
          { name: '企业办事', path: '/enterpriseService' },
          { name: '通知公告', path: '/noticeAnnouncement' },
          { name: '政策直通车', path: '/policyThroughTrain' },
          { name: '诉求服务', path: '/demandService' },
        ],

      }
    },
    mounted() {

    },
    methods: {

    },
  }
</script>

<style scoped>
  .navWrapper {
    width: 100%;
    height: 100px;
    background: rgb(204,204,204);
    padding-top: 30px;
  }
  .navBox{
    width: 100%;
    height: 70px;
    display: flex;
    flex-direction: row;
    padding-left: 100px;
  }
  .navBtn{
    margin-top: 20px;
    width: 130px;
    height: 48px;
    border-radius: 5px;
    background: #fff;
    color: #333333;
    margin-right: 20px;
    text-align: center;
    line-height: 48px;
    font-size: 16px;
    font-weight: bolder;
    cursor: pointer;
  }
  .navBtnActive{
    margin-top: 10px;
    width: 150px;
    height: 58px;
    border-radius: 5px;
    background: #f00;
    color: #fff;
    margin-right: 20px;
    text-align: center;
    line-height: 58px;
    font-size: 16px;
    font-weight: bolder;
    cursor: pointer;
  }
</style>

